package com.ruoyi.abuwx.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.abuwx.mapper.AbuwxRegionStatisticsMapper;
import com.ruoyi.abuwx.domain.AbuwxRegionStatistics;
import com.ruoyi.abuwx.service.IAbuwxRegionStatisticsService;

/**
 * 地区统计Service业务层处理
 * 
 * @author tang
 * @date 2022-07-02
 */
@Service
public class AbuwxRegionStatisticsServiceImpl implements IAbuwxRegionStatisticsService 
{
    @Autowired
    private AbuwxRegionStatisticsMapper abuwxRegionStatisticsMapper;

    /**
     * 查询地区统计
     * 
     * @param id 地区统计主键
     * @return 地区统计
     */
    @Override
    public AbuwxRegionStatistics selectAbuwxRegionStatisticsById(Long id)
    {
        return abuwxRegionStatisticsMapper.selectAbuwxRegionStatisticsById(id);
    }

    /**
     * 查询地区统计列表
     * 
     * @param abuwxRegionStatistics 地区统计
     * @return 地区统计
     */
    @Override
    public List<AbuwxRegionStatistics> selectAbuwxRegionStatisticsList(AbuwxRegionStatistics abuwxRegionStatistics)
    {
        return abuwxRegionStatisticsMapper.selectAbuwxRegionStatisticsList(abuwxRegionStatistics);
    }

    /**
     * 新增地区统计
     * 
     * @param abuwxRegionStatistics 地区统计
     * @return 结果
     */
    @Override
    public int insertAbuwxRegionStatistics(AbuwxRegionStatistics abuwxRegionStatistics)
    {
        abuwxRegionStatistics.setCreateTime(DateUtils.getNowDate());
        return abuwxRegionStatisticsMapper.insertAbuwxRegionStatistics(abuwxRegionStatistics);
    }

    /**
     * 修改地区统计
     * 
     * @param abuwxRegionStatistics 地区统计
     * @return 结果
     */
    @Override
    public int updateAbuwxRegionStatistics(AbuwxRegionStatistics abuwxRegionStatistics)
    {
        abuwxRegionStatistics.setUpdateTime(DateUtils.getNowDate());
        return abuwxRegionStatisticsMapper.updateAbuwxRegionStatistics(abuwxRegionStatistics);
    }

    /**
     * 批量删除地区统计
     * 
     * @param ids 需要删除的地区统计主键
     * @return 结果
     */
    @Override
    public int deleteAbuwxRegionStatisticsByIds(Long[] ids)
    {
        return abuwxRegionStatisticsMapper.deleteAbuwxRegionStatisticsByIds(ids);
    }

    /**
     * 删除地区统计信息
     * 
     * @param id 地区统计主键
     * @return 结果
     */
    @Override
    public int deleteAbuwxRegionStatisticsById(Long id)
    {
        return abuwxRegionStatisticsMapper.deleteAbuwxRegionStatisticsById(id);
    }
}
